package com.example.a1725185505.works.base;

import com.example.a1725185505.works.bean.AllShopBean;
import com.example.a1725185505.works.bean.AllUserCollectionBean;
import com.example.a1725185505.works.bean.FoodByIdBean;
import com.example.a1725185505.works.bean.FoodBySearchBean;
import com.example.a1725185505.works.bean.FoodByShopBean;
import com.example.a1725185505.works.bean.LoginBean;
import com.example.a1725185505.works.bean.RegisterBean;
import com.example.a1725185505.works.bean.ShopByIdBean;
import com.example.a1725185505.works.bean.UserByIdBean;
import com.example.a1725185505.works.bean.isCollectedBean;
import com.example.a1725185505.works.bean.updateUserByIdBean;
import com.example.a1725185505.works.bean.userCollectFoodBean;
import com.example.a1725185505.works.bean.userCollectShopBean;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

public interface Service {

    //登陆
    @GET("userLogin.do")
    Call<LoginBean> login(@Query("username") String username, @Query("userpass") String userpass);

    //注册
    @GET("userRegister.do")
    Call<RegisterBean> register(@Query("username") String username, @Query("userpass") String userpass,
                                @Query("mobilenum") String mobilenum,@Query("address") String address,
                                @Query("comment") String comment);

    //获取所有店铺信息
    @GET("getAllShops.do")
    Call<List<AllShopBean>> getshops();

    //获取当前店铺菜单信息
    @GET("getFoodByShop.do")
    Call<List<FoodByShopBean>> foodbyshop(@Query("shop_id") int shop_id);

    //获取店铺详情
    @GET("getShopById.do")
    Call<ShopByIdBean>  shopbyid(@Query("shop_id") int shop_id);

    //获取店铺菜单详情
    @GET("getFoodById.do")
    Call<FoodByIdBean>  foodbyid(@Query("food_id") int food_id);

    //收藏列表
    @GET("getAllUserCollection.do")
    Call<List<AllUserCollectionBean>> getallusercollection(@Query("user_id") int user_id, @Query("flag")
                                                         int flag);

    //收藏/取消收藏 店铺
    @GET("userCollectShop.do")
    Call<userCollectShopBean>  usercollectshop(@Query("user_id") int user_id, @Query("shop_id")
                                               int shop_id);

    //收藏/取消收藏 菜谱
    @GET("userCollectFood.do")
    Call<userCollectFoodBean> usercollectfood(@Query("user_id") int user_id, @Query("food_id")
                                              int food_id);

    //判断是否收藏
    @GET("isCollected.do")
    Call<isCollectedBean>  iscollected(@Query("user_id") int user_id, @Query("shop_food_id")
                                       int shop_food_id, @Query("flag") int flag);

    //所搜菜谱/口味
    @GET("getFoodBySearch.do")
    Call<List<FoodBySearchBean>>   foodbysearch(@Query("search") String search);

    //获取用户信息
    @GET("getUserById.do")
    Call<UserByIdBean>  userbyid(@Query("user_id") int user_id);

    //修改用户信息
    @GET("updateUserById.do")
    Call<updateUserByIdBean> updateuserbyid(@Query("user_id") int user_id, @Query("username")
                                                  String username, @Query("userpass") String userpass,
                                                  @Query("mobilenum") String mobilenum, @Query("address")
                                                  String address);

}
